<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="xView-min.js"></script>

<script type="text/javascript">

$(function(){

	//设置页面数据
	xView.setModel($("#model"), {
		a: {
			time1: 34234325450//时间戳
		},
		time2: 1,
		b: 1
	});
	
	console.log(xView.getModel($("#model")));
	
	console.log(xView.val($("#t1")))
	//xView.val($("#t1"),35234325450)
})


</script>


</head>
<body>
<div>普通模式</div>
<div id="model">
<!-- 时间戳格式化 -->
<div id="t1" x-view="div" x-name="a.time1" data-view="{data:'time',view:'yyyy-MM-dd'}"></div>
<input type="text" x-name="time2" x-view="" data-view="{data:'time',view:'yyyy-MM-dd'}">
<input  type="text" x-name="b" x-view="" data-view="{data:'enum',view:{1:'南昌',2:'北京'}}">
</div>

</body>
</html>